const app = getApp()

Component({
  data: {
    lang: app.globalData.language,
    selected: 0,
    color: "#002469",
    list: [{
      pagePath: "../index/index",
      iconPath: "../images/index_icon.png",
      selectedIconPath: "../images/index_icon_on.png",
      text: "首页",
      text_en: "home"
    }, {
      pagePath: "../exhibition/exhibition",
      iconPath: "../images/art_icon.png",
      selectedIconPath: "../images/art_icon_on.png",
      text: "艺术展",
      text_en: "Art Exhibitions"
    }, {
      pagePath: "../class/class",
      iconPath: "../images/ink_index_icon.png",
      selectedIconPath: "../images/class_icon_on.png",
      text: "水墨艺术大赛",
      text_en: "Ink Art Competition",
      middle: true
    }, {
      pagePath: "../events/events",
      iconPath: "../images/event_icon.png",
      selectedIconPath: "../images/event_icon_on.png",
      text: "活动",
      text_en: "Art Events"
    }, {
      pagePath: "../my/my",
      iconPath: "../images/user_icon.png",
      selectedIconPath: "../images/user_icon_on.png",
      text: "我的",
      text_en: "My Profile"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      //console.log(this.data.lang);
    }
  }
})